import Vue from 'vue';
import Router from 'vue-router';
import Home from './components/home/home';
import Components from './components/components/components';
import {vLayout, vHeader} from '../vui/components/api';
import API from './components/api';

Vue.use(Router);
//头部导航
export const HeaderRouter = [
  { path: '/', redirect: '/home' },
  { path: '/home', label: '主页', component: Home },
  { path: '/components', label: '组件', component: Components },
]

//组件导航
export const ComponentRouter = [
  { path: '/', redirect: '/components/button' },
  { path: '/components/button', label: 'Button', type: 'Basic', component: API.Button },
  { path: '/components/select', label: 'Select', type: 'Input', component: API.Select },
  { path: '/components/vmind', label: 'Vmind', type: 'Chart', component: API.Button },
]
HeaderRouter[2].children = ComponentRouter;
export default new Router({
  routes: HeaderRouter
})
